def Typer(**kwargs):
    def deco(obj):
        print("======>",obj)
        for key,value in kwargs.items():
            setattr(obj,key,value)
        return obj
    print("传入的参数%s" % kwargs)
    return deco

@Typer(x=1,y=2)
def AA():
    pass

print("函数AA加入装饰器后的结果:",AA.__dict__)

@Typer(name="alex",sex="女")
class FOO:
    pass
print("类的装饰器:",FOO.__dict__)
